<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>标签选择器</title>
  <style>
    /* 标签选择器 */
    div {
      color: red;
    }

    p {
      color: green;
    }

    span {
      color: pink;
    }

    /* 
    类选择器
    .类名 {}
    */
    .box1 {
      font-size: 50px;
    }

    .box2 {
      background-color: green;
      width: 300px;
      height: 150px;
    }

    /* 
     id选择器
     #id名 {}
    */
    #main {
      border: 10px solid #000;
    }
  </style>
</head>

<body>
  <div class="box1 box2">我是div标签111</div>
  <div id="main">我是div标签222</div>
  <p class="box1">我是段落标签</p>
  <span>我是行内标签</span>
</body>

</html>